home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_jep_bridge2.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  105 lines

  1. # Jones 3D Cog Script
  2. #
  3. #    jep_bridge2.cog
  4. #
  5. # [DS]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13. message    startup
  14. message    entered    
  15. message    activate
  16.  
  17. template    plank
  18. thing        plankpos
  19. thing        indyactor
  20. thing        campos
  21. thing        invisostop
  22. surface    bridge
  23. surface    bustedramp
  24. int        solved=0                    local
  25. thing        player                    local
  26. keyframe    in_place=in_reach_low.key        local
  27. cog        hintscog
  28. sound        placeit=jep_woodpart_place.wav    local
  29. int        curcam                    local
  30. thing        staticjeep            # link to jeep at encampment.
  31. Sound        jeep_in_way=inxj034.wav        local # unhh, there's no room...
  32.  
  33. end
  34.  
  35. # ===================================================================
  36.  
  37. code
  38. startup:
  39.     player = GetLocalPlayerThing();
  40.     return;
  41.  
  42. activate:
  43.     if(GetSenderRef() != bustedramp) return;
  44.     if (GetCurItem(player) == 109)                #Plank.
  45.     {
  46.     if (VectorDist(GetThingPos(staticjeep), GetThingPos(indyactor)) < .15)
  47.     {
  48.         MakeMeStop();
  49.         StartCutscene(0);
  50.         PlayVoice(player, jeep_in_way, 1.0, 1);
  51.         EndCutscene();
  52.         ClearActorFlags(player, 0x200000);
  53.         return;
  54.     }
  55.     curcam = GetCurrentCamera();
  56.     MakeMeStop();
  57.     DeselectWeaponWait(player);
  58.     StartCutscene(1);
  59.     CopyPlayerHolsters(player, indyactor);
  60.     SetThingFlags(player, 0x80000);
  61.     ClearThingFlags(indyactor, 0x80000);
  62.     SetCameraLookInterp(2, 0);            # turns off interp to lookthing.
  63.     SetCameraFocus(2, campos);
  64.     SetCameraSecondaryFocus(2, indyactor);
  65.     SetCurrentCamera(2);
  66.     SetCameraFOV(90, 0, 0);                # makes sure set to default.
  67.     PlayKey(indyactor, in_place, 4, 0x12, 0);
  68.     sleep(1.0);
  69.     PlaySoundLocal(placeit, 1.0, 0.0, 0x0, 0);
  70.     CreateThing(plank, plankpos);
  71.     ChangeInv(player, 109, -1);
  72.     solved=1;
  73.     DestroyThing(invisostop);
  74.     sleep(1.0);
  75.     CopyOrientAndPos(indyactor, player);
  76.     SendMessage(hintscog, user0);
  77.     SetCurrentCamera(curcam);
  78.     SetThingFlags(indyactor, 0x80000);
  79.     ClearActorFlags(player, 0x200000);
  80.     ClearThingFlags(player, 0x80000);
  81.     EndCutscene();
  82.     }
  83.     return;
  84.  
  85. entered:
  86.     if((solved == 1) || (global2 == 0))  return;
  87.     if(getsenderref() == bridge)
  88.     {
  89.     print ("tried busted ramp");
  90.     StopThing(GetLocalPlayerThing());
  91.     SetThingThrust(GetLocalPlayerThing(), '0.0 -1.5 0.0');
  92.     sleep(1.0);
  93.     StopThing(GetLocalPlayerThing());
  94.     }
  95.     return;
  96.  
  97. end
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.